package com.xinnet.mms.area.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xinnet.mms.area.dao.AreaDao;
import com.xinnet.mms.area.service.AreaService;
import com.xinnet.mms.entity.Area;

@Service("areaService")
public class AreaServiceImpl implements AreaService{
	
	@Autowired
	private AreaDao areaDao;
	
	public List<Area> getAreaList(){
		List<Area> arealiList = areaDao.getAreaList();
		return arealiList;
	}

	/**取得一级区域*/
	@Override
	public List<Area> getAreaOfClassA() {
		return areaDao.getAreaOfClassA();
	}
	
	/**根据一级区域ID取得二级区域*/
	@Override
	public List<Area> getAreaOfClassByParentId(String areaId) {
		return areaDao.getAreaOfClassByParentId(areaId);
	}
	/**根据二级区域ID取得一级区域*/
	@Override
	public Area getParentIdByAreaId(String areaId) {
		return areaDao.getParentIdByAreaId(areaId);
	}
	
	/**取得二级区域*/
	@Override
	public List<Area> getAreaOfClassB() {
		return areaDao.getAreaOfClassB();
	}

	/**
	 * 根据区域ID取区域
	 */
	@Override
	public Area getAreaByAreaId(String areaId) {
		return areaDao.getAreaByAreaId(areaId);
	}
}
